home *** CD-ROM | disk | FTP | other *** search
/ Resource for Source: C/C++ / Resource for Source - C-C++.iso / codelib9 / v_11_04 / 1104102a < prev    next >
Encoding:
Text File  |  1995-11-01  |  492 b   |  27 lines

  1. /* file STRDEF.H */
  2.  
  3.      defstr ( InitStr,  "Init String" )
  4.      defstr ( OtherStr, "Other String")
  5.  
  6. /* file STRDEMO. C */
  7.  
  8.      #include "strhndl.h"
  9.      #include <stdio.h>
  10.  
  11.      int main ()
  12.           {
  13.           puts(InitStr);
  14.           puts(OtherStr);
  15.           return O;
  16.           }
  17.  
  18. /* file STRHNDL.H */
  19.  
  20.      #define defstr (x,y) extern char x[];
  21.      #include "strdef.h"
  22.  
  23. /* file STRHNDL.C */
  24.  
  25.      #define defstr(x,y) char x[] = y;
  26.      #include "strdef.h"
  27.